package ee.ut.math.chess.base.model.chesspiece;

import java.util.ArrayList;
import java.util.List;

import ee.ut.math.chess.base.model.Move;
import ee.ut.math.chess.game.model.Game;

public class Queen extends ChessPiece{


	private static final long serialVersionUID = 1L;
	private long value = 9;

	public Queen(Color color) {
		this.color = color;
	}
	

	@Override
	public void setInInitialPosition(boolean inInitialPosition) {
		//not important;
	}

	@Override
	public boolean isInInitialPosition() {
		return false;//not important
	}

	@Override
	public List<Move> getLegalMoves(int x, int y, Game game, boolean onlyKingThreatening) {
		List<Move> result = new ArrayList<Move>();
		Rook rook = new Rook(color);
		result.addAll(rook.getLegalMoves(x, y, game, false));
		
		Bishop bishop = new Bishop(color);
		result.addAll(bishop.getLegalMoves(x, y, game, false));
		
		return result;
	}
	
	public long getValue() {
		return value;
	}

}
